@using Orchard.Blogs.Extensions;
@using Orchard.Core.Contents.ViewModels;
@using Orchard.Utility.Extensions;

@{ Layout.Title = T("Manage Blogs").ToString(); }

@if (Model.ContentItems.Items.Count > 0) { 
<div class="actions"><a class="add button primaryAction" href="@Url.BlogCreate()">@T("New Blog")</a></div>
    using(Html.BeginFormAntiForgeryPost(Url.Action("List", "Admin", new { area = "Contents", id = "" }))) {
        <fieldset class="bulk-actions">
            <label for="publishActions">@T("Actions:")</label>
            <select id="publishActions" name="Options.BulkAction">
                @Html.SelectOption(ContentsBulkAction.None, ContentsBulkAction.None, T("Choose action...").ToString())
                @Html.SelectOption(ContentsBulkAction.None, ContentsBulkAction.Remove, T("Delete").ToString())
            </select>
            @Html.Hidden("returnUrl", ViewContext.RequestContext.HttpContext.Request.ToUrlString())
            <button type="submit" name="submit.BulkEdit" value="yes">@T("Apply")</button>
        </fieldset>
        <fieldset class="contentItems bulk-items">
            @Display(Model.ContentItems)
        </fieldset>
    }
} else {
<div class="info message">@T("There are no blogs for you to see. Want to <a href=\"{0}\">add one</a>?", Url.BlogCreate())</div>
}